﻿
@{
    ViewBag.Title = "PlanFormPageList";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}

@section css{
    <style>
        .bg-light th {
            font-weight: bolder;
        }
    </style>
}
<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a>应急预案管理</a>
            </li>
            <li class="crumb-link">
                <a>应急预案</a>
            </li>
            <li class="crumb-trail">应急预案管理</li>
        </ol>
    </div>
</header>
<section id="content" class="animated fadeIn" ng-cloak ng-controller="EmergencyController" ng-init="SearchModel={};page='@(Request.QueryString["page"].IsEmpty() ? "1" : Request.QueryString["page"])';
     PageName='@Request.CurrentExecutionFilePath.Substring(Request.CurrentExecutionFilePath.LastIndexOf("/") + 1)';
     SearchModel={};
     SearchModel.PlaceId = '';
     GetPlanFormPageList(SearchModel,page);">
    <div class="panel">
        <div class="panel-heading">
            <span class="panel-title">
                <span class="glyphicons glyphicons-list"></span>应急预案清单
            </span>
        </div>
        <div class="panel-body fill">
            <table class="table table-bordered">
                <thead>
                    <tr class="bg-light">
                        <th style="text-align:center;">序号</th>
                        <th>预案标题</th>
                        <th>制定部门</th>
                        <th>类型</th>
                        <th>所有人可见</th>
                        <th>有效期</th>
                        <th>关键字</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-show="PlanFormList.length==0 && !PageLoading">
                        <td colspan="12" style="text-align:center;vertical-align:middle;line-height:30px;">没有数据</td>
                    </tr>
                    <tr ng-repeat="x in PlanFormList">
                        <td>
                            <span ng-bind="$index+1"></span>
                        </td>
                        <td ng-bind="x.Title"></td>
                        <td ng-bind="x.DepartmentName"></td>
                        <td><span class="control-label label label-success">{{x.TypeName}}</span></td>
                        <td><span class="control-label label label-success" ng-show="x.IsPublic">是</span><span class="control-label label label-success" ng-show="!x.IsPublic">否</span></td>
                        <td>{{x.ValidDate|JSONDate:'yyyy-MM-dd'}}</td>
                        <td ng-bind="x.Keywords"></td>
                        <td>
                            <a href="../EmergencyPlan/EmergencyPlanEdit?Id={{x.Id}}&page={{result.currentPage}}" class="btn btn-primary btn-xs btn-label"><i class="fa fa-pencil-square-o"></i>编辑</a>
                        </td>
                    </tr>
                </tbody>
            </table>

        </div>

    </div>
    <div class="text-center" ng-show="PlanFormList!=null && PlanFormList.length>0">
        <ul class="pagination  justify-content-center">
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlanFormPageList(SearchModel,1);">首页</a></li>
            <li class="page-item" ng-class="{'active':result.currentPage==page}" ng-repeat="page in result.pages"><a style="cursor:pointer;" ng-click="GetPlanFormPageList(SearchModel,page)" class="page-link" ng-bind="page"></a></li>
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlanFormPageList(SearchModel,(result.currentPage + 1 > result.totalPage ? result.totalPage : result.currentPage + 1))">下一页</a></li>
            <li class="page-item"><a class="page-link" style="cursor:pointer;" ng-click="GetPlanFormPageList(SearchModel,result.totalPage);">尾页</a></li>
        </ul>
    </div>
</section>

@section Js{
    <script src="~/bussiness/js/pg/EmergencyPlan.js?v=@DateTime.Now.ToString("yyMMddHHmm")"></script>
    <script src="~/bussiness/js/libs/moment.min.js"></script>
    <script src="~/bussiness/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/bussiness/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/bussiness/js/libs/angularjs-datepicker.js"></script>
    <script src="~/bussiness/js/libs/fileinput.js"></script>
    <script src="~/bussiness/js/libs/zh.js"></script>
}
